power of a number without using pow function